<template>
  <div>
    <a-modal v-model="visible" title="评标结果" :width="1200" @ok="ok" @cancel="cancel">
      <a-table rowKey="id" bordered size="middle" :columns="columns" :dataSource="dataSource" :pagination="false">
      </a-table>
    </a-modal>
  </div>
</template>

<script>
import { getAction } from '@api/manage'

export default {
  name: 'ExTbcompanyScoreList',
  components: {},
  props: {},
  data() {
    return {
      visible: false,
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          width: 60,
          align: 'center',
          customRender: function (t, r, index) {
            return parseInt(index) + 1
          },
        },
        {
          title: '投标人',
          align: 'center',
          dataIndex: 'bidderName',
        },
        {
          title: '投标报价',
          align: 'center',
          dataIndex: 'bidPrice',
        },
        {
          title: '最终报价',
          align: 'center',
          dataIndex: 'lastPrice',
        },
        {
          title: '工期',
          align: 'center',
          dataIndex: 'limiteTime',
        },
        {
          title: '质量',
          align: 'center',
          dataIndex: 'quality',
        },
        {
          title: '标书密封情况',
          align: 'center',
          dataIndex: 'isSeal',
        },
        {
          title: '开标备注',
          align: 'center',
          dataIndex: 'bidOpenRemark',
        },
        {
          title: '保证金',
          align: 'center',
          dataIndex: 'marginAmount',
        },
        {
          title: '商务标得分',
          align: 'center',
          dataIndex: 'businessPartScore',
        },
        {
          title: '技术标得分',
          align: 'center',
          dataIndex: 'techPartScore',
        },
        {
          title: '综合标得分',
          align: 'center',
          dataIndex: 'compositeScore',
        },
        {
          title: '其他得分',
          align: 'center',
          dataIndex: 'otherScore',
        },
        {
          title: '最终得分',
          align: 'center',
          dataIndex: 'finalScore',
        },
        {
          title: '排名',
          align: 'center',
          dataIndex: 'rank',
        },
      ],
      list: [],
      url: {
        list: '/exPingbiao/exTbcompanyScore/list',
      },
      sectionId: null,
      dataSource: [],
    }
  },

  computed: {},
  methods: {
    show(sectionId) {
      this.visible = true
      this.sectionId = sectionId
      this.queryList()
    },
    cancel() {
      this.visible = false
    },
    ok() {
      this.$emit('confirm')
    },
    queryList() {
      getAction(this.url.list+`?bidSectionId=${this.sectionId}`, { pageSize: 9999 })
        .then((res) => {
          if (res.success) {
            console.log(res)
            this.dataSource = res.result.records || res.result
          } else {
            this.$message.warning(res.message)
          }
        })
        .finally(() => {
          this.loading = false
        })
    },
  },
  created() {},
}
</script>

<style scoped>
</style>


